/*
 * @Description: 
 * @Author: Aroma
 * @Date: 2024-09-13 10:33:24
 * @LastEditors: Aroma
 * @LastEditTime: 2024-09-13 11:23:19
 * @别瞎看: 你个无脑牛马
 */
public class Animal{
    private String name;
    public int num=10;//显式初始化
    public Animal(){
        System.out.println("调用Animal的无参构造器");
    }
    public Animal(String name,int num){
        this.name=name;
        this.num=num;
        System.out.println("调用Animal的两参构造器");
    }
    public Animal(String name){
        this(name,0);
        System.out.println("调用Animal的一参构造器");
    }
    public void setName(String name){
        this.name=name;
    }
    public String getName(){
        return this.name;
    }
    public void setNum(int num){
        this.num=num;
    }
    public int getNum(){
        return this.num;
    }
    public void sayHello(){
        System.out.println(("自有  name:"+name));
        System.out.println(("自有  num:"+num));
    }
    public void wagTail() {
        // TODO Auto-generated method stub
        throw new UnsupportedOperationException("Unimplemented method 'wagTail'");
    }
    public void speak() {
        // TODO Auto-generated method stub
        throw new UnsupportedOperationException("Unimplemented method 'speak'");
    }
}
